{extend name="default/shops/base" /}
{block name="title"}卖家中心 - {:WSTConf('CONF.mallName')}{__block__}{/block}
{block name="css"}
<style>
.wst-content{min-height:185px;}
</style>
{/block}
{block name="content"}
<div class='wst-shop-name'><a href='{:Url("home/shops/home","shopId=".$data["shop"]["shopId"])}'>{$data['shop']['shopName']}</a></div>
<div class="wst-shop-info">
	<span class="wst-shop-img">
	  <a href="{:url('home/shops/home',array('shopId'=>$data['shop']['shopId']))}">
	  <img src="__RESOURCE_PATH__/{:WSTImg($data['shop']['shopImg'])}" title="{$data['shop']['shopName']}" alt="{$data['shop']['shopName']}">
	  </a>
	</span>
	<div class="wst-shop-na">
		<div class="wst-shop-na2">
		{volist name="$data['shop']['accreds']" id="sv"}
		<img src="__RESOURCE_PATH__/{$sv['accredImg']}" title='{$sv['accredName']}' alt='{$sv['accredName']}'>
		{/volist}
		</div>
		<span class="wst-shop-na3">上次登录：{:session('WST_USER.lastTime')}</span>
		<span class="wst-shop-na3">店铺地址：{:WSTMSubstr($data['shop']['shopAddress'],0,10)}</span>
	</div>
	<div class="wst-shop-eva">
		<p>商品评分</p>
		<div class="wst-shop-evai">
		{for start="0" end="$data['shop']['scores']['goodsScore']"}
			<img src="__STATIC__/plugins/raty/img/star-on.png">
		{/for}
		{for start="1" end="6-$data['shop']['scores']['goodsScore']"}
			<img src="__STATIC__/plugins/raty/img/star-off.png">
		{/for}
		</div>
	</div>
	<div class="wst-shop-eva">
		<p>时效评分</p>
		<div class="wst-shop-evai">
		{for start="0" end="$data['shop']['scores']['timeScore']"}
			<img src="__STATIC__/plugins/raty/img/star-on.png">
		{/for}
		{for start="1" end="6-$data['shop']['scores']['timeScore']"}
			<img src="__STATIC__/plugins/raty/img/star-off.png">
		{/for}
		</div>
	</div>
	<div class="wst-shop-eva">
		<p>服务评分</p>
		<div class="wst-shop-evai">
		{for start="0" end="$data['shop']['scores']['serviceScore']"}
			<img src="__STATIC__/plugins/raty/img/star-on.png">
		{/for}
		{for start="1" end="6-$data['shop']['scores']['serviceScore']"}
			<img src="__STATIC__/plugins/raty/img/star-off.png">
		{/for}
		</div>
	</div>
	<div class="wst-shop-con">
		<p>电话：{$data['shop']['shopTel']}</p>
		<p>QQ：{$data['shop']['shopQQ']}</p>
		<p>服务时间：{php}echo date("H:i",strtotime($data['shop']['serviceStartTime']));{/php}-{php}echo date("H:i",strtotime($data['shop']['serviceEndTime']));{/php}</p>
	</div>
	<div class="wst-clear"></div>
</div>


<div class="main">
	<div class="main_middle">
		<ul class="main_mid_box">
			<li class="mid_l">
				<div class="mid_l_item">
					<div class="main_title">
						<div class="wst-lfloat">
							<span class="tit_label"></span>
							<span class="c16_555">订单提示</span>
						</div>
						<div class="wst-rfloat">
								<span class="complain_num">{$data['stat']['complainNum']}</span>
								<span class="c16_555">收到投诉信息</span>
						</div>
						<div class="wst-clear"></div>
					</div>
					<div class="mid_main">
						<ul class="order_info">
							<li>
								<div class="info_item">
									<p class="c32_e33">{$data['stat']['waitReceiveCnt']}</p>
									<span class="c14_555">待收货</span>
								</div>
								<div class="info_item">
									<p class="c32_e33">{$data['stat']['waitDeliveryCnt']}</p>
									<span class="c14_555">待发货</span>
								</div>
							</li>
							<li>
								<div class="item_center">
									<div class="info_item">
										<p class="c32_e33">{$data['stat']['orderNeedpayCnt']}</p>
										<span class="c14_555">待付款</span>
									</div>
								</div>
							</li>
							<li>
								<div class="info_item">
									<p class="c32_e33">{$data['stat']['cancel']}</p>
									<span class="c14_555">取消/拒收</span>
								</div>
								<div class="info_item">
									<p class="c32_e33">{$data['stat']['orderRefundCnt']}</p>
									<span class="c14_555">待退款</span>
								</div>
							</li>
						</ul>
					</div>
				</div>

				<div class="mid_l_item" style="margin-top:20px;">
					<div class="main_title">
						<div class="wst-lfloat">
							<span class="tit_label"></span>
							<span class="c16_555">商品信息</span>
						</div>
					</div>
					<div class="wst-clear"></div>
					<div class="mid_main">
						<ul class="order_info">
							<li>
								<div class="info_item">
									<p class="c32_e33">{$data['stat']['unSaleCnt']}</p>
									<span class="c14_555">仓库中</span>
								</div>
								<div class="info_item">
									<p class="c32_e33">{$data['stat']['stockWarnCnt']}</p>
									<span class="c14_555">预警库存</span>
								</div>
							</li>
							<li>
								<div class="item_center item_sale">
									<div class="info_item">
										<p class="c32_e33">{$data['stat']['onSaleCnt']}</p>
										<span class="c14_555">出售中</span>
									</div>
								</div>
							</li>
							<li>
								<div class="info_item">
									<p class="c32_e33">{$data['stat']['waitAuditCnt']}</p>
									<span class="c14_555">待审核</span>
								</div>
								<div class="info_item">
									<p class="c32_e33">{$data['stat']['illegalCnt']}</p>
									<span class="c14_555">违规商品</span>
								</div>
							</li>
						</ul>
					</div>
				</div>
			</li>
			<li class="mid_c">
				<div class="index-right">
					<div class="index-right-item">
						<div class="main_title" style="padding-left:10px;">
							<div class="wst-lfloat">
								<span class="tit_label"></span>
								<span class="c16_555">最近七天销售排行</span>
							</div>
							<div class="wst-clear"></div>
						</div>
						<ul class="right-list-tit">
							<li class="c12_555">序号</li>
							<li class="c12_555">商品</li>
							<li class="c12_555">数量</li>
						</ul>
						{volist name="$data['stat']['goodsTop']" id="glist" key="gkey" length="10"}
						<ul class="right-list-tit right-list">
							<li class="c14_ff66">
								<div class="gTop{$gkey} top-num">{$gkey}</div>
							</li>
							<li class="wst-textover"><a class="c14_ff90" target="_blank" href="{:url('home/goods/detail',['goodsId'=>$glist.goodsId])}">{:WSTMSubstr($glist.goodsName,0,15)}</a></li>
							<li class="c14_ff66">{$glist.goodsNum?:0}</li>
						</ul>
						{/volist}

					</div>
				</div>

			</li>
			<li class="mid_r">
				<div class="mid_r_rtop">
					<div class="main_title">
						<div class="wst-lfloat">
							<span class="tit_label"></span>
							<span class="c16_555">平台联系方式</span>
						</div>
						<div class="wst-clear"></div>
					</div>
					<div class="rtop_main">
						<p class="rtop_item">电话：{:WSTConf('CONF.serviceTel')}</p>
						<p class="rtop_item">邮箱：{:WSTConf('CONF.serviceEmail')}</p>
					</div>
				</div>
				<div class='mid_r_rbottom'>
					<div class="main_title">
						<div class="wst-lfloat">
							<span class="tit_label"></span>
							<span class="c16_555">商家公告</span>
						</div>
						<div class="wst-clear"></div>
					</div>
					<div class="rbottom_main">
						<ul class="shop_tips">
							{wst:article cat="51" id="vo" num="10"}
							<li class="wst-textover"><a href="{:url('home/news/view',['id'=>$vo['articleId']])}" target="_blank">{$vo.articleTitle}</a></li>
							{/wst:article}
						</ul>
					</div>
				</div>
			</li>
		</ul>
	</div>

	<div class="sale_info">
		<div class="main_title">
			<div class="wst-lfloat">
				<span class="tit_label"></span>
				<span class="c16_555">近30天销售情况</span>
			</div>
			<div class="wst-clear"></div>
		</div>
		<div id="saleMain" style="width:100%;height:260px;"></div>
	</div>
</div>


{/* 近30天 */}
<input type="hidden"  id="startDate"  class="ipt" value='{:date("Y-m-d",strtotime("-30 day"))}'/>
<input type="hidden" id="endDate" class="ipt" value='{:date("Y-m-d")}'/>
{/block}
{block name="js"}
<script src="__STATIC__/plugins/echarts/echarts.min.js?v={$v}" type="text/javascript"></script>
<script>
$(function(){saleCount()});
// 销售统计
function saleCount(){
	$.post(WST.U('home/reports/getStatSales'),WST.getParams('.ipt'),function(data,textStatus){
	    var json = WST.toJson(data);
	    var myChart = echarts.init(document.getElementById('saleMain'));
	    myChart.clear();
	    $('#mainTable').hide();
	    if(json.status=='1' && json.data){
			var option = {
			    tooltip : {
			        trigger: 'axis'
			    },
			    calculable : true,
			    xAxis : [
			        {
			            type : 'category',
			            data : json.data.days
			        }
			    ],
			    yAxis : [
			        {
			            type : 'value'
			        }
			    ],
			    series : [
			        {
			            name:'销售额',
			            type:'line',
			            data:json.data.dayVals
			        }
			    ]
			};
			myChart.setOption(option);
	    }
	}); 
}
</script>
{/block}